package com.sq.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import com.sq.activity.domain.ActivityRegistration;
import org.apache.ibatis.annotations.Select;

/**
 * 活动报名Mapper接口
 * 
 * @author shan
 * @date 2025-02-12
 */
@Mapper
public interface ActivityRegistrationMapper extends BaseMapper<ActivityRegistration>
{
    /**
     * 查询活动报名
     * 
     * @param id 活动报名主键
     * @return 活动报名
     */
    public ActivityRegistration selectActivityRegistrationById(Long id);

    /**
     * 查询活动报名列表
     * 
     * @param activityRegistration 活动报名
     * @return 活动报名集合
     */
    public List<ActivityRegistration> selectActivityRegistrationList(ActivityRegistration activityRegistration);

    /**
     * 新增活动报名
     * 
     * @param activityRegistration 活动报名
     * @return 结果
     */
    public int insertActivityRegistration(ActivityRegistration activityRegistration);

    /**
     * 修改活动报名
     * 
     * @param activityRegistration 活动报名
     * @return 结果
     */
    public int updateActivityRegistration(ActivityRegistration activityRegistration);

    /**
     * 删除活动报名
     * 
     * @param id 活动报名主键
     * @return 结果
     */
    public int deleteActivityRegistrationById(Long id);

    /**
     * 批量删除活动报名
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteActivityRegistrationByIds(Long[] ids);

    @Select("select * from activity_registration where id = #{id}")
    ActivityRegistration selectonId(Long id);

    @Select("select * from activity_registration where activity_id = #{activityId}")
    List<ActivityRegistration> selectByActivityId(Long activityId);
}
